﻿@using Library
@model IQueryable<Ecommerce.Models.ApplicationRole>

@{
    ViewBag.Title = NOWCulture.GetString("Roles");
    ViewBag.ActiveUrl = "admin/roles";
    Layout = "_Layout.cshtml";
}

<h2>@NOWCulture.GetString("Role list")</h2>
<div class="table-responsive">
    <table class="table table-hover" id="rolelist">
        <thead>
            <tr>
                <th>#</th>
                <th>@NOWCulture.GetString("Role name")</th>
                <th>@NOWCulture.GetString("Description")</th>
                <th>&nbsp;</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var role in Model)
            {
                @Html.Partial("_RoleRow", role)
            }
        </tbody>
    </table>
</div>
<div class="modal fade" id="editorModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="@NOWCulture.GetString("Close")"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="modalLabel">@NOWCulture.GetString("Create new")/@NOWCulture.GetString("Edit") @NOWCulture.GetString("role")</h4>
            </div>
            <div id="formctnr"></div>
        </div>
    </div>
</div>
@section scripts
{
    @(HttpContext.Current.IsDebuggingEnabled ? Scripts.Render("~/bundles/admin-roles") : Scripts.RenderFormat(@"<script src=""{0}"" async defer></script>", "~/bundles/admin-roles"))
}